import app_mqtt
import app_network
import app_led
import time 
import app_sensor


#平台找信息替换
AccessToken='wli****bh4x'
ProjectKey='AmR****8ny'
mqttaddr= "sh-1-mqtt.iot-api.com"
serverport = 1883



if __name__ == '__main__':
    app_led.led_disp_thread()  #网络指示灯
    ret = app_network.connect_4g()
    if ret:     #判断联网是否成功
        app_mqtt.mqtt_connect(mqttaddr,AccessToken,ProjectKey,serverport)   #连接thingscloud平台
        app_sensor.get_uartdata_thread() #485透传线程
    while True:
        time.sleep(1)